import service from '@/utils/request'
// @Tags SysDrugs
// @Summary 创建药品信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.SysDrugs true "创建药品信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /drugs/createSysDrugs [post]
export const createSysDrugs = (data) => {
  return service({
    url: '/drugs/createSysDrugs',
    method: 'post',
    data
  })
}

// @Tags SysDrugs
// @Summary 删除药品信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.SysDrugs true "删除药品信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /drugs/deleteSysDrugs [delete]
export const deleteSysDrugs = (params) => {
  return service({
    url: '/drugs/deleteSysDrugs',
    method: 'delete',
    params
  })
}

// @Tags SysDrugs
// @Summary 批量删除药品信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除药品信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /drugs/deleteSysDrugs [delete]
export const deleteSysDrugsByIds = (params) => {
  return service({
    url: '/drugs/deleteSysDrugsByIds',
    method: 'delete',
    params
  })
}

// @Tags SysDrugs
// @Summary 更新药品信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.SysDrugs true "更新药品信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /drugs/updateSysDrugs [put]
export const updateSysDrugs = (data) => {
  return service({
    url: '/drugs/updateSysDrugs',
    method: 'put',
    data
  })
}

// @Tags SysDrugs
// @Summary 用id查询药品信息
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.SysDrugs true "用id查询药品信息"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /drugs/findSysDrugs [get]
export const findSysDrugs = (params) => {
  return service({
    url: '/drugs/findSysDrugs',
    method: 'get',
    params
  })
}

// @Tags SysDrugs
// @Summary 分页获取药品信息列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取药品信息列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /drugs/getSysDrugsList [get]
export const getSysDrugsList = (params) => {
  return service({
    url: '/drugs/getSysDrugsList',
    method: 'get',
    params
  })
}

// @Tags SysDrugs
// @Summary 不需要鉴权的药品信息接口
// @Accept application/json
// @Produce application/json
// @Param data query systemReq.SysDrugsSearch true "分页获取药品信息列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /drugs/getSysDrugsPublic [get]
export const getSysDrugsPublic = () => {
  return service({
    url: '/drugs/getSysDrugsPublic',
    method: 'get',
  })
}
